package common.model.po;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import common.model.enums.LayoutModeEnum;
import common.model.po.base.BasePo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @author 米泽鹏
 * @since 2023-09-15 下午 12:40
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "sys_web_config", autoResultMap = true)
@ApiModel(value = "SysWebConfig对象", description = "SysWebConfig对象")
public class SysWebConfig extends BasePo<SysWebConfig> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户id")
	@TableField(updateStrategy = FieldStrategy.NEVER)
	private Long userId;

	@ApiModelProperty(value = "布局方式")
	@TableField(updateStrategy = FieldStrategy.NOT_NULL)
	private LayoutModeEnum layoutMode;

	@ApiModelProperty(value = "后台页面切换动画")
	@TableField(updateStrategy = FieldStrategy.NOT_NULL)
	private String mainAnimation;

	@ApiModelProperty(value = "暗黑模式")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private Boolean isDark;

	@ApiModelProperty(value = "侧边菜单宽度(展开时)，单位px")
	@TableField(updateStrategy = FieldStrategy.NOT_NULL)
	private Integer menuWidth;

	@ApiModelProperty(value = "侧边菜单项默认图标")
	@TableField(updateStrategy = FieldStrategy.NOT_NULL)
	private String menuDefaultIcon;

	@ApiModelProperty(value = "是否水平折叠收起菜单")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private Boolean menuCollapse;

	@ApiModelProperty(value = "是否只保持一个子菜单的展开(手风琴)")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private Boolean menuUniqueOpened;

	@ApiModelProperty(value = "显示菜单栏顶栏(logo)")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private Boolean menuShowTopBar;

	@ApiModelProperty(value = "侧边菜单背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> menuBackground;

	@ApiModelProperty(value = "侧边菜单文字颜色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> menuColor;

	@ApiModelProperty(value = "侧边菜单激活项背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> menuActiveBackground;

	@ApiModelProperty(value = "侧边菜单激活项文字色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> menuActiveColor;

	@ApiModelProperty(value = "侧边菜单顶栏背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> menuTopBarBackground;

	@ApiModelProperty(value = "顶栏文字色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> headerBarTabColor;

	@ApiModelProperty(value = "顶栏背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> headerBarBackground;

	@ApiModelProperty(value = "顶栏悬停时背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> headerBarHoverBackground;

	@ApiModelProperty(value = "顶栏激活项背景色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> headerBarTabActiveBackground;

	@ApiModelProperty(value = "顶栏激活项文字色")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private List<String> headerBarTabActiveColor;

	@ApiModelProperty(value = "标签页是否显示图标")
	@TableField(typeHandler = JacksonTypeHandler.class, updateStrategy = FieldStrategy.NOT_NULL)
	private Boolean tabIcon;

	@ApiModelProperty(value = "语言")
	@TableField(updateStrategy = FieldStrategy.NOT_NULL)
	private String language;

	@Override
	public Serializable pkVal() {
		return super.getId();
	}

}
